import request from './../utils/request.js';

/**
 * 获取职业列表
 * @returns {*}
 */
export function getOccupationList() {
  return request.get('occupation_list', {});
}

/*
  获取首页菜单/我的菜单
 */
export function getBannerData(name = "") {
  if (!name) return false;
  return request.get('get_banner', {name: name});
}


/* 登陆 */
export function login(phone, password) {
  return request.get('login', {phone: phone, password: password});
}


/**
 * 获取文章列表
 */
export function getContentList(data) {
  return request.get('content/list', data);
}

/**
 * 获取文章详情
 */
export function getContentDetail(data) {
  return request.get('content/detail', data);
}


/**
 * 获取短链接
 */
export function getShortLink(id) {
  return request.post('member/get_short_link', {id: id});
}


export function bindPhone(data) {
  data['openid'] = wx.getStorageSync('openid') || "";
  return request.post('bind_phone', data);
}

